
/**
 * 插入排序
 */
public class InsertionSort {

    public void solution(){
        int N = nums.length;
        for (int i = 1; i < N; i++) {
            for (int j = i; j > 0 && nums[j] < nums[j-1]; j--) {
                swap(nums, j, j - 1);
            }
        }
    }

}